<?php
	// this file helps to run the actual yiic command line tool
	chdir(dirname(__FILE__).'/..');

	defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));

	require_once('common/lib/yii/yii.php');

	Yii::setPathOfAlias('common', 'common');

	// setting an app
	$app = Yii::createConsoleApplication(require('console/config/main.php'));
	$app->commandRunner->addCommands(YII_PATH.'/cli/commands');
	$app->run();
